package org.jseda;

/**
 * Processor is an interface that represents a worker to be plugged into a ProcessingStage.
 *
 * @author jmcnair
 *
 * @param <T> the type of work to be processed
 * @param <V> the resulting output type, possibly work for another Processor
 */
public interface Processor<T, V>
{
  /**
   * Process a unit of work.
   *
   * @param workUnit the unit of work to be processed
   * @param publisher the publisher which accepts output
   */
  void processWork(T workUnit, Publisher<V> publisher);
}
